Function |clamp
std/ops::|clamp
Usage
|clamp<T>(value, min, max)
Generics
◻ T:
Order
Parameters
↳ value:
T
↳ min:
T
↳ max:
T
Return
↴ T
Restrain value between min
and max
.
Value is returned if it is in the [min
,max
] interval.
If value is smaller min
is returned, or if it greater max
is returned.